package com.drcoffee.drcoffeemall.feign;

import com.drcoffee.drcoffeemall.entry.User;
import com.github.pagehelper.PageInfo;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;
import java.util.Map;

//@FeignClient(name = "provider-service", url = "http://localhost:8888")
@FeignClient(name = "provider-service", url = "http://localhost:8889")
public interface EnMallProviderClient {
    @PostMapping("/enMall/getOrder")
    PageInfo<Map<String, Object>> getOrder(Map<String, Object> paramMap);

    @PostMapping("/enMall/getOrderParts")
    List<Map<String, Object>> getOrderParts(Map<String, Object> paramMap);

    @PostMapping("/enMall/orderProcessing")
    Map<String, Object> orderProcessing(Map<String, Object> paramMap);

    @PostMapping("/enMall/getUserData")
    PageInfo<Map<String, Object>> getUserData(Map<String, Object> paramMap);


    @GetMapping("/enMall/getAllTradeCount")
    Integer getAllTradeCount(@RequestParam("date1") Date date1, @RequestParam("date2") Date date2);


    @PostMapping("/enMall/signinOverseasUser")
    void signinOverseasUser(@RequestBody User user);
}
